<template>
    <el-card class="search-panel">
        <SchemaSearchBar
            :schema="searchSchema"
            @load="onLoad"
            @search="onSearch"
            @reset="onReset"
        ></SchemaSearchBar>
    </el-card>
</template>
<script setup>
import { inject } from'vue';
import SchemaSearchBar from '$aegisWidgets/schema-search-bar/schema-search-bar.vue';
const { searchSchema } = inject('schemaViewData');

const emit = defineEmits(['search']);
const onLoad = (searchValObj)=>{
    emit('search',searchValObj)
};
const onSearch = (searchValobj)=>{
    emit('search',searchValobj)
};
const onReset=()=>{
    emit('search', {})
};
</script>
<style lang="less" scoped>
.search-panel {
    margin: 10px;
}
:deep(.el-card body){
    padding-bottom:2px;
}
</style>